/*
 * @Author: 凌宇king
 * @Date: 2022-09-18 15:09:53
 * @LastEditTime: 2022-09-21 19:46:59
 */
const mongoose = require('mongoose')
//建立订单信息表 
const orderSchema = new mongoose.Schema({
    openid: String,
    startAddress: { type: String, default: '' },
    endAddress: { type: String, default: '' },
    orderType: String,
    payMoney: Number,
    publicTime: String,
    status: String,
    completed: String,
    isCompleted: Boolean,
    info: Object,
    userInfo: Object,
    acceptMan: { type: String, default: '' },
    acceptTime: { type: String, default: '' },
    confirmTime: { type: String, default: '' }
})
//创建地址model对象 
const order = mongoose.model('Order', orderSchema, 'order')
//导出
module.exports = order 